using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
[CreateAssetMenu(fileName ="随机事件")]
public class RandomEvents :ScriptableObject
{
   [Header("事件库名称")]
    public string head;
    [Header("加号在事件库添加事件")]
    public List<EventClass> randomEvents = new List<EventClass>();
}
[Serializable]
public class EventClass
{
    [Header("事件前置条件")]
    public QianZhi qianZhi;
    [Header("事件图片")]
    public Sprite air;
    [Header("事件文本")]
    public string EventText;
    [Header("事件总选项")]
    public List<OptionClass> zhongOptioms = new List<OptionClass>();
    [Header("阴阳属性")]
    public bool yingyang;
    [Header("好事坏事")]
    public bool haos;
    [Header("稀有度")]
    public int xiyou;
}
[Serializable]
public class OptionClass
{
    [Header("选项前置条件")]
    public QianZhi qianZhi;
    [Header("选项文本")]
    public string optionText;
    [Header("选项触发函数")]
    public List<OptionEvent> optionEvents = new List<OptionEvent>();

    [Header("五行最低需求")]
    public List<WuXingXUQiu> wuxings = new List<WuXingXUQiu>();
    [Header("阴阳")]
    public bool yingyang;

    [Header("成功触发函数")]
    public List<OptionEvent> success = new List<OptionEvent>();
    [Header("失败触发函数")]
    public List<OptionEvent> fail = new List<OptionEvent>();
}
[Serializable]
public class OptionEvent
{
    [Header("触发函数名")]
    public string eventE;
    [Header("触发函数值(用#分割)")]
    public string parameter;
}
[Serializable]
public class WuXingXUQiu
{
    [Header("选项五行")]
    public TypeOfWuxing wuxing;
    [Header("五行最低需求")]
    public int zhi;

}
[Serializable]
public class ShuXingXUQiu
{
    [Header("选项属性")]
    public TypeOfShuxing wuxing;
    [Header("属性最低需求")]
    public int zhi;

}
[Serializable]
public class QianZhi
{
    [Header("前置事件")]
    public string qianzhishijian;
    [Header("属性限制")]
    public List<ShuXingXUQiu> shuxing = new List<ShuXingXUQiu>();
    [Header("五行限制")]
    public List<WuXingXUQiu> wuxings = new List<WuXingXUQiu>();
}